home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacAdvocate 2
/
MACADVCT.ISO
/
mac
/
Goodies
/
Fun Stuff
/
Utilities
/
UltraFind
/
AppleScript™ Examples
/
UTF Find Creator & Type
< prev
next >
Wrap
Text File
|
1996-12-30
|
1KB
|
37 lines
tell application "UltraFind 2.3"
clear
set the text of fileName of its searchRoutine to "read"
set the fileCreator of its searchRoutine to "ttxt"
set the fileType of its searchRoutine to "TEXT"
scan
end tell
copy the result to numFiles
if numFiles is greater than 0 then
repeat with fileNum from 1 to numFiles
tell application "UltraFind 2.3"
copy (the fileName of fileRecord fileNum) to fName
copy (the fileCreator of fileRecord fileNum) to fCreator
copy (the fileType of fileRecord fileNum) to fType
copy (the accessPath of fileRecord fileNum) to fPath
copy (the fileSize of fileRecord fileNum) to fSize
end tell
-- --------------------------------------------
-- OUTPUT
-- In this example a simple dialog is used for output,
-- you should replace this with the application you want the information output to.
-- --------------------------------------------
display dialog "Found 'ReadMe' " & (fileNum as text) & " of " & (numFiles as text) & return & return & ┬
"Filename : " & fName & return & ┬
"Creator : '" & fCreator & "'" & return & ┬
"Type : '" & fType & "'" & return & ┬
"Size : " & (fSize as text) & return & return & ┬
"Where:" & return & return & fPath ┬
buttons {"Cancel", "Next"} default button 2
end repeat
end if